package com.heima.article.job;

import com.heima.article.service.IApHotArticlesService;
import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.annotation.XxlJob;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
@Slf4j
@Component
public class ComputeHotArticleJob {

    @Autowired
    private IApHotArticlesService hotArticlesService;

    /**
     * 定时任务方法
     */
    @XxlJob("computeHotArticleJob")
    public ReturnT<String> getHotArticle(String param){
        log.info("热文章分值计算调度任务开始执行....");
        hotArticlesService.findHotArticle();
        log.info("热文章分值计算调度任务开始执行....");
        return ReturnT.SUCCESS;
    }
}
